The present embodiments relate to three-dimensional sketching. In particular, three-dimensional (3D) geometry is inferred from a hand-drawn, and thus, two-dimensional (2D), input.
U.S. Published Patent Application No. 2006/0082571, for Systems and Method for Three-Dimensional Sketching, provides three dimensional models using hand drawing recognition for fast prototype developing. The 3D geometry is inferred based on the 2D relationships of the lines and/or curves between newly drawn lines and any existing model. The relationships are converted to 3D constraints. The 3D constraints are then solved to find the potential 3D positions. The solution provides for various elements of the inferred geometry to form connected loops.
If the parts of the geometry are poorly sized or the relationships are wrong, solving the relationships for a looped geometry or solving a geometry which connects to an existing model at multiple points may cause gaps. The end points of each curve are modeled separately so that even where two curves are joined together at the same corner in the original 2D view, the two end points may separate along the z-axis in the 3D model when the 3D constraints are solved. The gaps are along a depth or viewing direction (e.g., in or out of the plane of the 2D input). FIG. 1 shows a case where a rectangular geometry of lines ABCD is hand drawn on a screen 12 representing an existing 3D model 14. The view of ABCD in FIG. 1 is a rotated view, not as drawn by the user as 2D sketch. The 2D sketch has the lines being connected. The different lengths for the A and C lines in the 3D model may cause the solution, where the other edges form perpendicular angles, to have a gap between the A and D curves.
The 3D constraints may be refined to close the gaps of the 3D geometry. The refinement may make the 3D geometry fit together cleanly. However, this refinement may cause alignments, angles, and other geometric properties to have poor results.